<script lang="ts" setup>
import { computed } from "vue";
import "@/assets/images/iconfont.js";

const props = defineProps<{ name?: Nullable<string> }>();
const suffix = computed(() => `#icon-${props.name}`);
</script>

<template>
  <svg class="icon" aria-hidden="true">
    <use :xlink:href="suffix"></use>
  </svg>
</template>

<style lang="scss" scoped>
.icon {
  vertical-align: -0.15em;
  width: 1em;
  height: 1em;
  overflow: hidden;
  fill: currentColor;
}
</style>
